package com.swufe.lianxi;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Build;

import androidx.annotation.Nullable;

import java.util.function.DoubleBinaryOperator;

public class DBHelper extends SQLiteOpenHelper {
    private static final String DB_NAME = "myrate.db";
    static final String TB_NAME ="tb_rates" ;
    private static final int VERSION = 1;

    public DBHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }
   public DBHelper(Context context){
       super(context,DB_NAME,null,VERSION);

   }
    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("CREATE TABLE "+TB_NAME+"(ID INTEGER PRIMARY KEY　autoincrement　,CURRATE TEXT)");
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
